The present invention relates to network communication, and more particularly, to a network switch.
A virtual local area network, commonly known as a VLAN, is a logically independent network. Several VLANs can co-exist on a single physical switch. IEEE 802.1Q is the predominant protocol.
Early VLANs were often configured to reduce the size of the collision domain in a large single Ethernet segment to improve performance. When Ethernet switches made this a non-issue, attention turned to reducing the size of the broadcast domain at the media access control (MAC) layer. Another purpose of a virtual network is to restrict access to network resources without regard to physical topology of the network, although the strength of this method is debatable.
FIG.1 shows the frame format 100 according to the IEEE 802.1Q standard. Field 102 and 104 are destination and source MAC addresses of the frame, respectively. IEEE 802.1q does not actually encapsulate the original frame. Instead, it adds an extra 4-byte VLAN tag header 106 to the original Ethernet header. The EtherType 108 is changed to 0x8100, denoting the new frame format. The VLAN tag header 106 contains the following fields: user_priority, CFI, and VID. User_priority field 110 is 3-bits long and can be used to store a priority level for the frame. CFI field 112 is a 1-bit flag denoting whether MAC addresses in the frame are in canonical format. This is called the Canonical Format Indicator. VID field 114 is a 12-bit VLAN ID and allows up to 4096 VLANs.
The VID field 114 of VLAN tag 106 in IEEE 802.11Q is of great use for switches of the Internet service providers (ISP). In the ISP network, a switch often uses the VID of a received packet as a reference for deciding the egress port forwarded the packet. In general, a switch supports single VID space, wherein the VID space indicates the 4096 number of VLAN which can be specified by the 12-bit VID field. If more than one LAN segment or physical LAN with the same VID is simultaneously connected to the ISP network via a switch, however, the switch cannot differentiate between the LAN segments or physical LANs, and the packets moving toward those LAN segments or physical LANs will be guided to the wrong egress port in the switch.